import request from '@/utils/request'

/*
 * 采购管理-采购计划 api
 * @path "@/api/prod/purchase/plan";
*/

let path = '/prod/purchase/plan';

// 详情
export function get(id) {
  return request({
    url: path + `/${id}`,
    method: 'get',
  })
}

// 列表
export function pageList(data) {
  return request({
    url: path + '/list',
    method: 'post',
    data,
  })
}

// 分页
export function page(data) {
  return request({
    url: path + '/page',
    method: 'post',
    data,
  })
}

// 新增
export function add(data) {
  return request({
    url: path + '/add',
    method: 'post',
    data,
  })
}

// 删除
export function del(id) {
  return request({
    url: path + `/${id}`,
    method: 'delete',
  })
}

// 修改
export function edit(data) {
  return request({
    url: path + '/edit',
    method: 'put',
    data,
  })
}